package router

import (
	"gateway/basic/config"
	"gateway/handler/api"
	"gateway/middleware"
	"github.com/gin-gonic/gin"
)

func UserLogin(r *gin.Engine) {
	v1 := r.Group("/v1")
	{
		v1.POST("/send/sms", api.SendSms)             //短息发送
		v1.POST("/sms/login", api.UserLogin)          //短信登录
		v1.POST("/password/login", api.PasswordLogin) //密码登录
		v1.GET("/user/profile", api.GetUserProfile)   //获取所有用户信息
		v1.Use(middleware.JWTAuth(config.JWTKEY))     //JWT认证
		v1.POST("/profile", api.UserProfile)          //更新用户信息
		v1.GET("/user/detail", api.GetUserDetail)     //获取用户详情
	}
}
